import { _decorator, Component, Label } from 'cc';
import { GameManager } from '../GameManager';
const { ccclass, property } = _decorator;

@ccclass('BombUI')
export class BombUI extends Component {

    @property({ type: Label })
    bombNumber: Label = null;
    
    start() {
        GameManager.getInstance().node.on('onBombChange', this.onBombChange, this);
    }

    update(deltaTime: number) {
        
    }

    onBombChange() {
       this.bombNumber.string = GameManager.getInstance().GetBombNumber().toString();
    }
}


